var returnList = document.querySelector("#returnList");
returnList.onclick = function () {
    window.history.go(-1);
};

// 提交事件
function replyMsg(ele) {
    let content = ele.previousElementSibling.innerText
        .replace(/\n/g, "<br/>")
        .replace(/ /g, "&nbsp;");
    // ajax请求
    let sendContent = {
        "customerId": customerId,
        "programId": programId,
        "programCommentContent": content
    };
    let url = ROOTSources + "/program/comment/add";
    let ajax = new XMLHttpRequest() || new ActiveXObject('Microsoft.XMLHTTP');
    ajax.open("POST", url, true);
    ajax.setRequestHeader("Content-Type", "application/json");
    ajax.send(JSON.stringify(sendContent));
    ajax.onreadystatechange = function () {
        if (ajax.readyState === 4) {
            if (ajax.status >= 200 && ajax.status < 300 || ajax.status === 304) {
                window.history.go(0);
            }
        }
    }
}
